package com.ml.doctor.fragment;

import android.support.v4.app.Fragment;

import com.ml.doctor.dialog.LoadingDialog;

/**
 * Created by kun on 17/12/5.
 */

public class BaseFragment extends Fragment {
    private LoadingDialog mLoadingDialog;


    public void showLoadingDialog() {
        showLoadingDialog(null);
    }

    public void showLoadingDialog(String message) {
        if (mLoadingDialog == null) {
            mLoadingDialog = new LoadingDialog(getActivity(), message);
        }
        mLoadingDialog.show();
    }

    public void hideLoadingDialog() {
        if (mLoadingDialog != null && mLoadingDialog.isShowing()) {
            mLoadingDialog.dismiss();
        }
    }

}
